//字符串截取
template.defaults.imports.subStr = function (val, length) {
    if (val && val != "" && val.length > length)
        return val.substring(0, length) + "...";
    return val;

}